package com.hejia.alauda.jms;

import java.util.HashMap;
import java.util.Map;

import javax.jms.Destination;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.jms.core.JmsTemplate;

import com.hejia.alauda.entity.Financing;

public class AlaudaSender {
	
	private JmsTemplate jmsTemplate;

	public JmsTemplate getJmsTemplate() {
		return jmsTemplate;
	}

	public void setJmsTemplate(JmsTemplate jmsTemplate) {
		this.jmsTemplate = jmsTemplate;
	}
	
	public void send(AlaudaEvent event,Destination destination) {
		jmsTemplate.setDefaultDestination(destination);
		jmsTemplate.convertAndSend(event);
	}
}
